<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" language="JavaScript">
	$(function() {
		$("#submitBtn").click(function() {
			var q = $("#q").val() ;
			if(q != null && q != "") {
				$("#searchForm").submit() ;
				return false ;
			} else {
				alert("请输入关键字") ;
				return false ;
			}
		}) ;
	}) ;
</script>
</head>
<body>
	<div class="row" style="padding-top: 10px;" >
		<div class="col-md-12">
			<nav class="navbar navbar-default">
			  <div class="container-fluid">
			  
			    <div class="navbar-header">
			      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
			        <span class="sr-only">Toggle navigation</span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			      </button>
			      <a class="navbar-brand" href="${pageContext.request.contextPath}/index.html"><font color="black"><strong>首页</strong></font></a>
			    </div>
			
			    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			      <ul class="nav navbar-nav">
			        <li><a href="${pageContext.request.contextPath}/blogger/aboutMe.html"><font color="black"><strong>关于博主</strong></font></a></li>
			        <li><a href="${pageContext.request.contextPath}/download.html"><font color="black"><strong>本站源码下载</strong></font></a></li>
			      </ul>
			      
			      <form id="searchForm" class="navbar-form navbar-right" action="${pageContext.request.contextPath}/blog/q.html" method="POST">
			        <div class="form-group">
			          <input id="q" name="q" type="text" class="form-control" value="${q }" placeholder="请输入要查询的关键字...">
			        </div>
			        <button id="submitBtn" type="submit" class="btn btn-default">搜索</button>
			      </form>
			     
			    </div>
			  </div>
			</nav>
		</div>
	</div>
</body>
</html>